package xian_cheng;

import java.util.concurrent.ThreadPoolExecutor;

/***
 *@title ThreadTest
 *@description <TODO description class purpose>
 *@author 许文迪
 *@version 1.0.0
 *@create 2025/5/27 14:36
 **/
public class ThreadTest extends Thread{
    public void run(){
        System.out.println("线程启动了");
        try {
            System.out.println("线程等待中");
            Thread thread = Thread.currentThread();
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("线程结束");
    }

    public static void main(String[] args) {
        ThreadTest t = new ThreadTest();
        t.start();
//        t.interrupt();
        System.out.println("主线程结束");
    }
}
